<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= webpackConfig.name %></title>
  </head>
  <body style="margin: 0; padding: 0;">
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <script type='text/javascript'>
      function getExplorerInfo() {
        parseInt()
        var explorer = window.navigator.userAgent.toLowerCase();
        if (explorer.indexOf("chrome") >= 0) {
          var ver = explorer.match(/chrome\/([\d.]+)/)[1];
          if (parseInt(ver) >= 64) return true 
          console.log('您的Chrome版本为 =' + ver)
          return false
        } else {
          return false
        }
        //ie
        // if (explorer.indexOf("msie") >= 0) {
        //   console.log('3')
        //   var ver = explorer.match(/msie ([\d.]+)/)[1];
        //   return { type: "IE", version: ver };
        // }
        // else if (explorer.indexOf("edge") >= 0) {
        //   var ver = explorer.match(/edge ([\d.]+)/)[1];
        //   return { type: "Edge", version: ver };
        // }
        // //firefox
        // else if (explorer.indexOf("firefox") >= 0) {
        //   var ver = explorer.match(/firefox\/([\d.]+)/)[1];
        //   return { type: "Firefox", version: ver };
        // }
        // //Chrome
        // else if (explorer.indexOf("chrome") >= 0) {
        //   var ver = explorer.match(/chrome\/([\d.]+)/)[1];
        //   return { type: "Chrome", version: ver };
        // }
        // //Opera
        // else if (explorer.indexOf("opera") >= 0) {
        //   var ver = explorer.match(/opera.([\d.]+)/)[1];
        //   return { type: "Opera", version: ver };
        // }
        // //Safari
        // else if (explorer.indexOf("Safari") >= 0) {
        //   var ver = explorer.match(/version\/([\d.]+)/)[1];
        //   return { type: "Safari", version: ver };
        // } else {
        //   return { type: "啥都不是", version: ver}
        // }
      }
      const isChrome = getExplorerInfo()
      if (!isChrome) {
        var str = "你的浏览器版本或Chrome内核低于64,已经和时代脱轨了 :(";
        var str2 = "推荐使用:<a href='https://www.google.cn/intl/zh-CN/chrome/' target='_blank' style='color:#3bba3b;'>谷歌</a>,"
          + "<a href='https://www.baidu.com/s?ie=UTF-8&wd=360%E6%9E%81%E9%80%9F%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' style='color:#3bba3b;'>360极速浏览器</a>,"
          + "双核极速模式";
        document.writeln("<pre style='text-align:center;color:#fff;background-color:#2d3a4b; height:100%;border:0;position:fixed;top:0;left:0;width:100%;z-index:1234'>" +
          "<h2 style='padding-top:200px;margin:0'><strong>" + str + "<br/></strong></h2><h2>" +
          str2 + "</h2><h2 style='margin:0'><strong>如果你的使用的是双核浏览器,请切换到极速模式访问<br/></strong></h2></pre>");
        document.execCommand("Stop");

      }
      // alert("浏览器:" + getExplorerInfo().type + "\n 版本:" + getExplorerInfo().version);

      // console.log('getExplorerInfo().type = ' + getExplorerInfo().type)
      // console.log('getExplorerInfo().version = ' + getExplorerInfo().version)
    </script>
    <style>
      /* 兼容顶部白边 */
      pre {
        margin-top: 0px;
      }
    </style>
  </body>
</html>
